<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
  <title id="gy141670">pg_operator</title>
  <body>
    <p>The <codeph>pg_operator</codeph> system catalog table stores information about operators,
      both built-in and those defined by <codeph>CREATE OPERATOR</codeph>. Unused column contain
      zeroes. For example, <codeph>oprleft</codeph> is zero for a prefix operator.</p>
    <table id="gy150092">
      <title>pg_catalog.pg_operator</title>
      <tgroup cols="4">
        <colspec colnum="1" colname="col1" colwidth="131pt"/>
        <colspec colnum="2" colname="col2" colwidth="72.75pt"/>
        <colspec colnum="3" colname="col3" colwidth="105pt"/>
        <colspec colnum="4" colname="col4" colwidth="147pt"/>
        <thead>
          <row>
            <entry colname="col1">column</entry>
            <entry colname="col2">type</entry>
            <entry colname="col3">references</entry>
            <entry colname="col4">description</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry colname="col1">
              <codeph>oid</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3"/>
            <entry colname="col4">Row identifier (hidden attribute, must be explicityly selected)</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>oprname</codeph>
            </entry>
            <entry colname="col2">name</entry>
            <entry colname="col3"/>
            <entry colname="col4">Name of the operator</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>oprnamespace</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_namespace.oid</entry>
            <entry colname="col4">The OID of the namespace that contains this operator</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>oprowner</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_authid.oid</entry>
            <entry colname="col4">Owner of the operator</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>oprkind</codeph>
            </entry>
            <entry colname="col2">char</entry>
            <entry colname="col3"/>
            <entry colname="col4"><codeph>b</codeph> = infix (both), <codeph>l</codeph> = prefix
              (left), <codeph>r</codeph> = postfix (right)</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>oprcanmerge</codeph>
            </entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">This operator supports merge joins</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>oprcanhash</codeph>
            </entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">This operator supports hash joins</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>oprleft</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_type.oid</entry>
            <entry colname="col4">Type of the left operand</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>oprright</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_type.oid</entry>
            <entry colname="col4">Type of the right operand</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>oprresult</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_type.oid</entry>
            <entry colname="col4">Type of the result</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>oprcom</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_operator.oid</entry>
            <entry colname="col4">Commutator of this operator, if any</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>oprnegate</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_operator.oid</entry>
            <entry colname="col4">Negator of this operator, if any</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>oprcode</codeph>
            </entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">Function that implements this operator</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>oprrest </codeph>
            </entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">Restriction selectivity estimation function for this
              operator</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>oprjoin</codeph>
            </entry>
            <entry colname="col2">regproc</entry>
            <entry colname="col3">pg_proc.oid</entry>
            <entry colname="col4">Join selectivity estimation function for this operator</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
  </body>
</topic>
